Telegram Group & Telegram Channel
128. Pattern

1
3 2
4 5 6
10 9 8 7
11 12 13 14 15
21 20 19 18 17 16


#include<stdio.h>
int main()
{
int i,j,k,l,n;

scanf("%d",&n);

for(k=i=1;i<=n;i++)
{
l=k+i-1;
for(j=1;j<=i;j++)
{
if(i%2==1)
printf("%d ",k);
else
printf("%d ",l);
k++;
l--;
}
printf("\n");
}
return 0;
}
#program_by : @aShish_bhushan



tg-me.com/C_Codings/184
Create:
Last Update:

128. Pattern

1
3 2
4 5 6
10 9 8 7
11 12 13 14 15
21 20 19 18 17 16


#include<stdio.h>
int main()
{
int i,j,k,l,n;

scanf("%d",&n);

for(k=i=1;i<=n;i++)
{
l=k+i-1;
for(j=1;j<=i;j++)
{
if(i%2==1)
printf("%d ",k);
else
printf("%d ",l);
k++;
l--;
}
printf("\n");
}
return 0;
}
#program_by : @aShish_bhushan

BY C Language πŸ‘¨β€πŸ’»


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/C_Codings/184

View MORE
Open in Telegram


C Language ‍ Telegram | DID YOU KNOW?

Date: |

Telegram announces Search Filters

With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even β€œYesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.

What is Secret Chats of Telegram

Secret Chats are one of the service’s additional security features; it allows messages to be sent with client-to-client encryption. This setup means that, unlike regular messages, these secret messages can only be accessed from the device’s that initiated and accepted the chat. Additionally, Telegram notes that secret chats leave no trace on the company’s services and offer a self-destruct timer.

C Language ‍ from ye


Telegram C Language πŸ‘¨β€πŸ’»
FROM USA